Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for H2 #1252

Closed
wants to merge 3 commits into from
Closed

Add support for H2 #1252

wants to merge 3 commits into from

Conversation

blafond
Copy link
Member

@blafond blafond commented Mar 22, 2022

Fixes #929

Added custom H2 client pool and configuration changes to test against an H2 database

@blafond blafond requested a review from DavideD March 22, 2022 20:50
Copy link
Member

@DavideD DavideD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

We still need to move this in a separate optional dependency. So that it can be included the same way we add only the necessary Vertx SQL drivers

@@ -33,6 +36,9 @@

private static final String DEFAULT_DB = "hreactDB";

@Rule
public DatabaseSelectionRule rule = DatabaseSelectionRule.skipTestsFor( H2 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test should also work for H2. I think it will if you implement createJdbcUrl correctly

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our Vertx supported DB's all use the DefaultSqlClientPoolConfiguration.connectOptions() method. SqlConnectOptions requires a host and port, so for H2, it would mean coding around these checks.

In H2SqlClientPool I'm using a local SqlConnectOptions object, but I don't need to. Since this class is isolated and uses vertx-jdbc-client JDBCConnectOptions anyway I think it might be better to not use SqlConnectOptions for H2.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this test uses DefaultSqlClientPool and DefaultSqlClientPoolConfiguration().connectOptions( uri ) which are specific to non-H2 Db's I think it still makes sense to skip H2 dbtype

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can update the test so that it works for both, though. Anyway, ok, let's fix everything else first

hibernate-reactive-core/build.gradle Outdated Show resolved Hide resolved
hibernate-reactive-core/build.gradle Outdated Show resolved Hide resolved
@blafond blafond force-pushed the issue_929 branch 2 times, most recently from 640613e to fe8ede8 Compare March 30, 2022 14:18
hibernate-reactive-h2/LICENSE Outdated Show resolved Hide resolved
@Sanne
Copy link
Member

Sanne commented Mar 30, 2022

Nice to see progress on this :) thanks @blafond !

@blafond blafond force-pushed the issue_929 branch 2 times, most recently from 502efa7 to 0c63496 Compare April 4, 2022 14:11
@DavideD
Copy link
Member

DavideD commented Apr 8, 2022

We are putting this on hold because the build fails randomly with NullPointerException. We suspect it has something to do with operations not happening in the right order when using H2 with Vert.x JDBC Client. Right now we need to dedicate some time on something else but we will get back to this later.

@DavideD DavideD marked this pull request as draft April 8, 2022 09:17
@DavideD
Copy link
Member

DavideD commented Jun 13, 2022

I'm going to send a new PR

@DavideD DavideD closed this Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for H2
4 participants